#ifndef MYMAIN_H
#define MYMAIN_H

#include <QWidget>
#include <QLabel>
#include <QPixmap>
#include <QHBoxLayout>
#include <QPainter>
#include <QPushButton>
#include <QLineEdit>
#include "widget.h"

class Mymain:public QWidget
{
    Q_OBJECT
private:
    Widget *widgetMain;
    QLabel *p_login_img;
    QLineEdit *p_ip;
    QLineEdit *p_port;
    QPushButton *p_login_button;
    QString ip="";
    int port=6060;
    int ready=0;

public slots:
    void start_game();
    void enterip(){
        ready++;
        ip=p_ip->text();
    };
    void enterport(){
        ready++;
        port=p_port->text().toInt();
    };

public:

    Mymain(QWidget *parent=nullptr);
};

#endif // MYMAIN_H
